import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)
const routes = [
  {
    //先写路径再写路由
    path: '/',
    name: 'Home',
    component: Home,
      meta:{
        // 是否显示app.vue底部菜单
          isShow:true,
      }
  },
    {
        path: '/Home',
        name: 'Home',
        component: () => import('../views/Home.vue'),
        meta:{
            isShow:true,
        }
    },
    {
        path: '/Car',
        name: 'Car',
        component: () => import('../views/Car.vue'),
        meta:{
            isShow:true,
        }
    },
    {
        path: '/My',
        name: 'My',
        component: () => import('../views/My.vue'),
        meta:{
            isShow:true,
        }
    },
    {
        path: '/view_register',
        name: 'view_register',
        component: () => import('../views/view_register.vue'),
        meta:{
            isShow:true,
        }
    },
    {
        path: '/view_login',
        name: 'view_login',
        component: () => import('../views/view_login.vue'),
        meta:{
            isShow:true,
        }
    },
    {
        path: '/birthdayCake',
        name: 'birthdayCake',
        component: () => import('../views/birthdayCake.vue'),
        meta:{
            isShow:true,
        }
    },
    {
        path: '/car_cover',
        name: 'car_cover',
        component: () => import('../views/car_cover.vue'),
        meta:{
            isShow:true,
        }
    },
    {
        path: '/detaile',
        name: 'detaile',
        component: () => import('../views/detaile.vue'),
        meta:{
            isShow:false,
        }
    },
    {
        path: '/Cheap2',
        name: 'Cheap2',
        component: () => import('../views/Cheap2.vue'),
        meta:{
            isShow:true,
        }
    },
    {
        path: '/buyGoods',
        name: 'buyGoods',
        component: () => import('../views/buyGoods.vue'),
        meta:{
            isShow:false,
        }
    },
    {
        path: '/address',
        name: 'address',
        component: () => import('../views/address.vue'),
        meta:{
            isShow:true,
        }
    }
]
const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})
export default router
